home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / konq_events.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.0 KB  |  71 lines

  1. #ifndef __konq_events_h__
  2. #define __konq_events_h__
  3.  
  4. #include <kparts/event.h>
  5. #include <qptrlist.h>
  6. #include <libkonq_export.h>
  7.  
  8. namespace KParts
  9. {
  10.   class ReadOnlyPart;
  11. }
  12.  
  13. class KConfig;
  14. class KFileItem;
  15. typedef QPtrList<KFileItem> KFileItemList;
  16.  
  17. class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event
  18. {
  19. public:
  20.   KonqFileSelectionEvent( const KFileItemList &selection, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemSelectionEventName ), m_selection( selection ), m_part( part ) {}
  21.  
  22.   KFileItemList selection() const { return m_selection; }
  23.   KParts::ReadOnlyPart *part() const { return m_part; }
  24.  
  25.   static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemSelectionEventName ); }
  26.  
  27. private:
  28.   static const char *s_fileItemSelectionEventName;
  29.  
  30.   KFileItemList m_selection;
  31.   KParts::ReadOnlyPart *m_part;
  32. };
  33.  
  34. class LIBKONQ_EXPORT KonqFileMouseOverEvent : public KParts::Event
  35. {
  36. public:
  37.   KonqFileMouseOverEvent( const KFileItem *item, KParts::ReadOnlyPart *part ) : KParts::Event( s_fileItemMouseOverEventName ), m_item( item ), m_part( part ) {}
  38.  
  39.   const KFileItem* item() const { return m_item; }
  40.   KParts::ReadOnlyPart *part() const { return m_part; }
  41.  
  42.   static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemMouseOverEventName ); }
  43.  
  44. private:
  45.   static const char *s_fileItemMouseOverEventName;
  46.  
  47.   const KFileItem* m_item;
  48.   KParts::ReadOnlyPart *m_part;
  49. };
  50.  
  51. class LIBKONQ_EXPORT KonqConfigEvent : public KParts::Event
  52. {
  53. public:
  54.   KonqConfigEvent( KConfig *config, const QString &prefix, bool save ) : KParts::Event( s_configEventName ), m_config( config ), m_prefix( prefix ), m_save( save ) {}
  55.  
  56.   KConfig * config() const { return m_config; }
  57.   QString prefix() const { return m_prefix; }
  58.   bool save() const { return m_save; }
  59.  
  60.   static bool test( const QEvent *event ) { return KParts::Event::test( event, s_configEventName ); }
  61.  
  62. private:
  63.   static const char *s_configEventName;
  64.  
  65.   KConfig *m_config;
  66.   QString m_prefix;
  67.   bool m_save;
  68. };
  69.  
  70. #endif
  71.